package com.modules.flexnet.business.delegates
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;
	
	public class ProductDataDelegate
	{
		private var responder:IResponder;
		private var service:RemoteObject;
		
		public function ProductDataDelegate(responder:IResponder)
		{
			//service = ServiceProxy.getInstance().service.getRemoteObject("productService");
			//var kk=ServiceProxy.getInstance();
			service = ServiceLocator.getInstance().getRemoteObject("productService");
			this.responder = responder;
		}
		public function getProducts():void
		{
			var token: AsyncToken = service.GetAllProducts();
			token.addResponder(responder);
			//default cairngorm API
			//token.resultHandler = responder.onResult;
			//token.faultHandler = responder.onFault;
		}

	}
}